package com.hb.trans.mvp.model

import com.basiclib.base.BaseModel
import com.hb.trans.api.EndPoints
import com.hb.trans.api.TRANS_SERVER_MY_PATH
import com.hb.trans.bean.Base
import com.hb.trans.bean.Update
import com.hb.trans.bean.VersionInfo
import com.hb.trans.mvp.contract.UserCenterContract
import io.reactivex.Observable
import javax.inject.Inject

class UserCenterModel @Inject constructor(var api: EndPoints) : BaseModel(), UserCenterContract.Model {
    override fun checkUpdate(): Observable<Base<VersionInfo>> {
        return api.getVersionInfo()
    }

    override fun getById(): Observable<Base<Update>> {
        return api.getById("${TRANS_SERVER_MY_PATH}version/getById")
    }

}
